﻿using System.Collections;
using System.Data;

namespace GT
{
    public static partial class Extensions
    {
        public static Hashtable ToHashTable(this DataRow dr)
        {
            Hashtable htReturn = new Hashtable(dr.ItemArray.Length);
            foreach (DataColumn dc in dr.Table.Columns)
                htReturn.Add(dc.ColumnName, dr[dc.ColumnName]);

            return htReturn;
        }

    }
}
